<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:body>

	<f:view>
		<ui:composition template="WEB-INF/templates/template.xhtml">

			<!-- Um den großen lila Hintergrund erscheinen zu lassen -->
			<ui:define name="lilabg">
				<div id="lilabg">&nbsp;</div>
			</ui:define>

			<ui:define name="content">
				<h:form>
					<div class="six columns">
						<div class="row">
							<div class="four columns">
								<label for="email">E-Mail Adresse deiner Freunde:</label>
							</div>
							<div class="eight columns">
								<h:inputText name="emailfriends" id="emailfriends"
									value="#{sharingBean.friendsemail}" type="text" ><f:validator validatorId="EmailValidator" />
								</h:inputText>
							</div>
						</div>
						<div class="row">
							<div class="four columns">
								<label for="email">Betreff:</label>
							</div>
							<div class="eight columns">
								<h:inputText name="subject" id="subject"
									value="#{sharingBean.initSubjectforUser()}" type="text"
									readonly="true" />
							</div>
						</div>
						<div class="row">
							<div class="four columns">
								<label for="email">Content:</label>
							</div>
							<div class="eight columns">
								<h:inputTextarea name="content" id="content"
									value="#{sharingBean.initContentforUser()}" readonly="true"
									rows="4" cols="30" />
							</div>
						</div>

						<div class="row">
							<div class="four columns"></div>
							<div class="eight columns">
								<h:commandButton id="sendButton" value="abschicken"
									action="#{sharingBean.sendMailtoAll(sharingBean.getFriendsemail())}" 
									onclick='if(!$.browser.mozilla){window.close();}else{ document.getElementById("j_id_j:sendButton").style.visibility = "hidden";document.getElementById("j_id_j:content").value = unescape("Ihre Email wurde geschickt.\nBitte schlie%DFen Sie dieses Browserfenster.");document.getElementById("j_id_j:subject").value = "------------------------";};'/>
							</div>
						</div>
					</div>
				</h:form>
			</ui:define>




			<!-- Um das Menü im Footer zu ändern -->
			<!-- <ui:define name="footer">
		    	blah
		    </ui:define>-->



			<!--  Für JS-Scripts die für eine Seite benötigt werden -->
			<ui:define name="scripts">
				<script type="text/javascript">
					$(window).load(function() {
						$('#slider').orbit();
					});
				</script>
			</ui:define>

		</ui:composition>
	</f:view>

</h:body>
</html>
